import { createRouter, createWebHashHistory } from "vue-router";
import Cookbook from '@/views/cookbook/Cookbook.vue'

const routes = [
    {
        path: '/',
        redirect: '/category',
    },
    {
        component: Cookbook,
        path: '/cookbook',
        meta: {
            title: '菜谱大全'
        }
    },
    {
        component: () => import('@/views/category/Category.vue'),
        path: '/category',
        meta: {
            title: '分类'
        }
    },
    {
        component: () => import('@/views/more/More.vue'),
        path: '/more',
        meta: {
            title: '更多'
        }
    }
]

export default createRouter({
    history: createWebHashHistory(),
    routes,
});